#ifndef LOCALIMAGEVIEW_H
#define LOCALIMAGEVIEW_H

#include <QThread>
#include <QTimer>
#include <QMutex>
#include "imageview.h"

#include <pthread.h>
#include <queue>
#include <string>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

class LocalImageView : public ImageView
{
    Q_OBJECT
public:
    explicit LocalImageView(QWidget *parent = 0);
    
signals:

public slots:
    void changeVideoSource(QString m_source);
    void continueGrab();
    void stopGrab();
    void grab();

public:
    QString m_source;
    int m_device;
    QTimer m_timer;
    cv::Mat m_img;
    cv::VideoCapture m_capture;
    bool m_last_timer_state;//for pause and continue;
    QMutex m_img_mutex;

};



#endif // LOCALIMAGEVIEW_H
